#include <stdio.h>

int main()
{
	int mi = 0, mo = 0;
	printf("要计算 2 的多少次方？");
	scanf("%d", &mi);
	
	switch(mi % 4)
	{
		case 0:
			mo = 1;
			break;
		case 1:
			mo = 2;
			break;
		case 2:
			mo = 4;
			break;
		case 3:
			mo = 3;
			break;
		default:
			mo = 0;
	}

	printf("2 的 %d 次方对 5 取模的结果是：%d\n", mi, mo);

	return 0;
}
